<?	include('includes/loader.inc.php'); 

// Obtengo las categorias
$categorias = $db->get_results("SELECT * FROM productos_categorias WHERE id_categoria_parent = 0 ORDER BY categoria");

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<?	include('includes/modules/head.inc.php'); ?>
</head>
<body>

	<?	include('includes/modules/header.inc.php'); ?>

    <div id="main">
		<div id="main2">	
            <div id="sidebar">
                <h2>Categor&iacute;as</h2>
                <ul>
					<?	foreach ($categorias as $categoria)
							echo '<li><a href="/productos/'.$categoria['id_categoria'].'/'.urlencode($categoria['categoria']).'">'.ucfirst($categoria['categoria']).'</a></li>';
					?>
                </ul>
            </div><!-- sidebar -->    	              
            <div id="content">			
                <div class="post">
					<?	foreach ($categorias as $categoria)
							echo '<h2><a href="/productos/'.$categoria['id_categoria'].'/'.urlencode($categoria['categoria']).'">'.ucfirst($categoria['categoria']).'</a></h2><p class="postmeta"></p>';
					?>
				</div>
            </div><!-- content -->                    
            <div class="clearing">&nbsp;
		</div>   
    </div></div><!-- main --><!-- main2 -->

	<?	include('includes/modules/footer.inc.php'); ?>

</html>
